package com.tedu.bill;

/**
 * Author：毕龙
 * Date: 2024/3/17 14:32
 */
public class TestTypeProgress {
    public static void main(String[] args) {
        byte b1 = 123;
        char c1 = 'b';
        //类型自动提升为int
        //char c2 = c1 + b1;
        short s1 = 1;
        int i1 =  b1 + s1 + c1;
        System.out.println(i1);
        long l1 = 1L;
        //只要有一个long 类型提升为long
        long l2 =  l1 + i1;
        System.out.println(l2);
        float f1 = 1.2f;
        //只要有一个float 类型提升为float
        float f2 = l2 + f1;
        System.out.println(f2);
        double d1 = 1;
        //只要有一个double 类型提升为double
        double d2 = f2+d1;
        System.out.println(d2);
        String str = "哈哈";
        //提升引用类型
        str = str + d2;
        System.out.println(str);

    }
}
